<?php
	if(isset($_GET['uid'])&&intval($_GET['uid'])>0)
	{
		$uid=intval($_GET['uid']);
	}
	else
	{
		if($logid!=false)
			$uid=$logid;
		else
			edp_redirect(edp_href_link(PAGENAME_PAGE_NOT_FOUND));
	}
?>
	<div class="main_box">
    	<div class="left_bar">
        	<div class="order_box">
            	<h1></h1>
                <h2>
                	<div class="ordertitle"><?php secho($user); ?>的图片（<?php echo $picCountBySid?>）</div>

                </h2>
                <h3></h3>
            </div>
             
            <div class="pic_box">
            	<div class="pic_box1">
				  <div class="pic_box2">
				 <?php 
					 	if( $pics ){
					 		$num = '0';
					 		foreach( $pics as $key => $value ){		
				 ?>      
            	
                       
                        <dl class="pic_item_box">
						  <dt>
						  	 <span tag="picname"><?php secho( $value['name'] ); ?></span>
						 	 <a href="#"><img src="<?php echo EdpGetSmallPicURL($value['picture_path']);?>"  class="item_list_pic"/></a>					
							 <span><?php echo $value['pub_date'] ?></span>
				<?php
				if($logid&&$logid==$uid)
				{ 
				?>
							  <div class="edit_pic"><a href="#" tag="changename" pid="<?php echo $value['id'] ?>" >改名</a> | <a href="#" tag="delete" pid="<?php echo $value['id'] ?>">删除</a></div>
				<?php
				} 
				?>
                            </dt>                                                                         
                        </dl>
                        
			 	<?php 
			 			  $num++;	
				 		  if($num%4=='0')
				 		  {
							  echo '</div><div class="pic_box2">';		 		  
				 		  }
					 	}
					 }
                 ?>
                 </div>                   
       		  </div>
          </div>
        <div class="pic_box_bottomline"></div>
 
        <div class="pagebox">
           <?php
           echo $page->getBar(); ?>
       </div>
      </div>
   
        <div class="right_bar">
          <dl class="cate_box">
            	<dt>店铺分类</dt>
				 <dd><h1><a href="<?php echo edp_href_link(PAGENAME_USER_PICTURE,"uid=".$uid);?>">全部</a></h1></dd>            	
	            
			      <?php
				   if($picCate)
				   {
				  		 foreach($picCate as $cate)
				  		 {
						
							echo '<dd><h1><a href="'.edp_href_link(PAGENAME_USER_PICTURE, 'sid='.$cate['id'].'&uid='.$uid).'">'.sconv($cate['shop_name']) .'</a>('.$reviewDAO->GetPictureCountBySid($cate['id'],$uid).')</h1></dd>';
									 
							$num++;							 
						 	if($num == 5)
						 		 break;					
						}
						if(count($picCate) > $num)
						{
							$picCateHidden  = array_slice($picCate,$num);	
										
							echo '<span id="hiddenCate">';
						
			            	foreach($picCateHidden as $cate)
			            	{	
								echo '<dd><h1><a href="'.edp_href_link(PAGENAME_USER_PICTURE, 'sid='.$cate['id'].'&uid='.$uid).'">'.sconv($cate['shop_name']) .'</a>('.$reviewDAO->GetPictureCountBySid($cate['id'],$uid).')</h1></dd>';
			             	}
							
							echo '</span>';	
							echo '<span id="btnShowCate" class="mr">显示更多</span>';
						}				
				   }
				?>       
          </dl>  
      </div>
  
	<div id="delPicBox" style="display:none;cursor:default;" class="popup">
	 <div class="popup1">
	 	<div class="popup_title">删除图片</div><div tag="close_box" class="popup_close"><a href="#"><span>关闭窗口</span></a></div>
	 </div>
	 <div class="popup2">
	 <div class="popup_content">确认删除图片？</div>
		 
     </div>
	 <div class="popup3">
	 	<div class="popup_btns">
		 	<input type="button" class="btn_1" id="delPicBtn" value="删除">&nbsp;
		 	<input type="button" class="btn_1" tag="close_box" value="取消">
		 </div>
	 </div>
	
</div>

     
   <div id="msgbox" style="display:none;cursor:default;" class="popup">
	<div class="popup1">
		<div class="popup_title">更改名称</div>
		<div id="closeWindow" class="popup_close" tag="close_box"><a href="#"><span>关闭窗口</span></a></div>
	</div>
	<div class="popup2">
		<table border="0" cellspacing="0" cellpadding="0" class="popup_table">
			<tr><td>更名为：</td><td><input id="changedname" type="text" class="input_1"/> </td></tr>
		</table>
		<div class="popup_btns">
			<input type="button" id="msgboxok" value="更改" class="btn_1"/>&nbsp;
			<input type="button" tag="close_box" class="btn_1" value="取消" />
		</div>
	</div>
	<div class="popup3"></div>
</div>


